deleting records by linking tables